<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>图片移动</title>
    <style>
        /* transition配合hover使用 
        hover的属性执行一个动画的效果
        
        */
        
    img{
        /* 设置图片上移终点 */
        margin-top:40px;
        transition: all 0.5s;

    }
    img:hover{
        margin-top:30px;
        box-shadow: 0 0 5px 3px #8b8686;
    }
    
    </style>
</head>
<body>
    <img src="images/02.png" alt="">
</body>
</html>